cmake_minimum_required(VERSION 3.2)
project(lua_snapshot CXX C)

set(DIR_3RD /usr/local/include/)
set(DIR_LIBS /usr/local/bin/)

set(INC_3RD
    ${DIR_3RD}/lua-5.4.3/src
)

include_directories(${INC_3RD})

set(LIB_3RD
    lua
)

link_directories(${DIR_LIBS})

set(LIB_COMM pthread z dl rt m)
add_compile_options(-ggdb -Wall)
set(LINK_FLAGS "-Wl,-E")

set(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR})
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${PROJECT_SOURCE_DIR})

# add_library(snapshot SHARED snapshot.c)
# set_target_properties(snapshot PROPERTIES PREFIX "")
# target_link_libraries(snapshot ${LIB_3RD} ${LIB_COMM})


add_executable(snapshot main.c snapshot.c)
target_link_libraries(snapshot ${LIB_3RD} ${LIB_COMM})